package com.lxf.project;

import com.lxf.project.imlp.HelloService;
import com.lxf.project.inteface.IHelloWorld;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;


public class AnnotitionConsumer {
    public static void main(String[] args) throws InterruptedException {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ConsumerConfiguration.class);
        System.out.println(1);
        context.start();
        IHelloWorld helloWorld = context.getBean("helloComponent", IHelloWorld.class);
        int i = 0;
        for (;;) {
            i ++;
            String hello = helloWorld.sayHello("world"+i);
            System.out.println("result :" + hello);
            Thread.sleep(1000);
        }



    }

}
